<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@include file="../../common/includeBaseSet.jsp" %>
<%@include file="../../common/includeSystemSet.jsp" %>
<%@include file="../../common/operation_forbid.jsp" %>
<!DOCTYPE html >
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>跟进方式统计报表</title>
    
</head>
<body>
	<iframe id="mainFrame" name="mainFrame" scrolling="yes" frameborder="0" style="padding: 0px; width: 100%; height: 100%;">
	</iframe>
</body>
<script type="text/javascript">
	$(function(){
		var projectIds = "${projectIds}";
		if(projectIds != ""){
			projectIds = projectIds.replace("(","").replace(")","");
		}
		var url = "${reportUrl}?reportlet=HouseStock.cpt&merchantId=${merchantId}&projectId="+projectIds+"&op=write";
		$("#mainFrame").attr("src", url);
	});
	//iframe自适应大小
	var browserVersion = window.navigator.userAgent.toUpperCase();
	var isOpera = false, isFireFox = false, isChrome = false, isSafari = false, isIE = false;
	function reinitIframe(iframeId, minHeight) {
	    try {
	        var iframe = document.getElementById(iframeId);
	        var bHeight = 0;
	        if (isChrome == false && isSafari == false)
	            bHeight = iframe.contentWindow.document.body.scrollHeight;
	
	        var dHeight = 0;
	        if (isFireFox == true)
	            dHeight = iframe.contentWindow.document.documentElement.offsetHeight + 2;
	        else if (isIE == false && isOpera == false)
	            dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
	        else if (isIE == true && ! -[1, ] == false) { } //ie9+
	        else
	            bHeight += 3;
	
	        var height = Math.max(bHeight, dHeight);
	        if (height < minHeight) height = minHeight;
	        iframe.style.height = height + "px";
	    } catch (ex) { }
	}
	function startInit(iframeId, minHeight) {
	    isOpera = browserVersion.indexOf("OPERA") > -1 ? true : false;
	    isFireFox = browserVersion.indexOf("FIREFOX") > -1 ? true : false;
	    isChrome = browserVersion.indexOf("CHROME") > -1 ? true : false;
	    isSafari = browserVersion.indexOf("SAFARI") > -1 ? true : false;
	    if (!!window.ActiveXObject || "ActiveXObject" in window)
	        isIE = true;
	    window.setInterval("reinitIframe('" + iframeId + "'," + minHeight + ")", 100);
	} 
	startInit('mainFrame', 560);
</script>
</html>